package org.openrbac.rbac.controller;

import org.openrbac.rbac.entity.Dict;
import org.openrbac.rbac.service.CatalogueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 梁富贵
 * @Date 2024/5/22
 **/
@RestController
@RequestMapping("/catalogue")
public class CatalogueController {
    @Autowired
    private CatalogueService catalogueService;

    @PostMapping("/getCatalogue")
    public List<Dict> getCatalogue(@RequestBody List<String> name) {
        return catalogueService.getCatalogue(name);
    }
}
